#!/bin/bash
#set -x
binddn='cn=Manager,dc=jhc,dc=cn'
pwdfile=~/.ldappwd
basedn='dc=jhc,dc=cn'
classcn=$1

ldapsearch -x -y "$pwdfile" -D "$binddn" -b "$basedn" -s sub "(cn=$classcn)" | grep '^memberUid:' | sed 's/^memberUid: //'
